package user

import (
	"context"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/repository/user"
	pb "git.mycaigou.com/gfyx/micro-gfyx-user-service/proto/micro_gfyx_user_service_proto/micro-gfyx-user-service"
)

type UserLoginServiceIface interface {
	//绑定用户
	BindUser(ctx context.Context, mobile, openId string, wechatType int32, unionId string) (*user.CommonUserInfoBo, string, error)
	//openid登录
	LoginByOpenId(ctx context.Context, openId string, loginType int32, unionId string) (*user.CommonUserInfoBo, string, error)
	LoginByAccountPassword(ctx context.Context, tenantCode, account, password string, isNeedMd5 bool) (*user.CommonUserInfoBo, string, error)
	LoginBySso(ctx context.Context, tenantCode, account, appid string) (*user.CommonUserInfoBo, string, error)
	LoginByMobileSms(ctx context.Context, request *pb.LoginByMobileSmsRequest, loginType int32) (*user.CommonUserInfoBo, string, error)
	Logout(ctx context.Context, globalUserId string, logoutType string) error
	LogoutByToken(ctx context.Context, token string) error

	//token验证
	VerifyToken(ctx context.Context, token string) (*user.CommonUserInfoBo, error)
}
